# a. 使用while循环实现输出2-3+4-5+6...+100 的和：
a = 2
d = 0
while a < 100:
    b = a + 1
    c = a - b
    if c == -1 :
        d -= 1
    a = b + 1
print( d + a )
#  b. 使用while 循环实现输出1,2,3,4,5, 7,8,9, 11,12
'''a = 0
while a <= 12:
    a += 1
    if a == 6:
        pass
    if a == 10:
        pass
    else:
        print(a)'''
# c.使while循环输出100-50，从大到小，如100，99，98...，到50时再从0循环输出到50，然后结束
'''a = 100
while a <= 100 :
    print(a)
    a -= 1
    if a == 49:
        a = 0
        break
while a <= 50:
    print(a)
    a += 1
    if a == 51:
        break'''
# d. 使用while循环实现输出1-100 内的所有奇数
# a = 0
# while a <= 99:
#     a += 1
#     if a%2 == 1:
#         print(a)
#  e.使用while循环实现输出1-100内的所有偶数
a = 0
'''while a <= 100:
    a += 1
    if a%2 == 0:
        print(a)'''
